import { createStore, applyMiddleware } from 'redux' //创建store，并使用中间件
import thunk from 'redux-thunk' // 异步中间件
import { composeWithDevTools } from 'redux-devtools-extension' // 开发者工具
import { rootReducer } from './reducers'

const middlewares = composeWithDevTools(applyMiddleware(thunk))

const store = createStore(rootReducer, middlewares)

export default store
